package org.merka.cryptochat.websocket.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.socket.BinaryMessage;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;

public class ConversationWebSocketHandler extends TextWebSocketHandler
{
	private static transient Logger logger = LoggerFactory.getLogger(ConversationWebSocketHandler.class);
	
	@Override
	protected void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception
	{
		logger.info("Received WebSocket message: " + message);
//		super.handleTextMessage(session, message);
	}
	
	@Override
	public void handleMessage(WebSocketSession session, WebSocketMessage<?> message) throws Exception
	{
		logger.info("message: " + message);
//		super.handleMessage(session, message);
	}
	
	@Override
	protected void handleBinaryMessage(WebSocketSession arg0, BinaryMessage arg1)
	{
		logger.info("message: " + arg1);
	}
}
